@import '@/app/styles/variables';

.container {
  position: relative;
  margin-top: 40px;
  margin-bottom: 24px;
  height: 108px;
  transition: $transition-disappear;
}
.container_selected {
  height: 48px;
}
.filters_container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  height: 48px;
}

.filters {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  height: 48px;
}

.icon_settings {
  cursor: pointer;
  border-radius: 12px;
  width: 0;
  height: 0;
  overflow: hidden;
  background: #f3f3f3;
  transition: $transition-disappear;
  fill: #f3f3f3;
  margin-left: 4px;
  &:hover {
    background: #e1e1e1;
    fill: #e1e1e1;
  }
  &.icon_settings_no_hover {
    &:hover {
      background: #f3f3f3;
      fill: #f3f3f3;
    }
  }
}

.select_title {
  margin-right: 4px;
  cursor: pointer;
  width: fit-content;
  display: flex;
  transition: 0.375s max-width ease, 0.375s max-height ease, 0.375s padding ease, 0.375s opacity ease;
  max-width: 135px;
  height: 48px;
  padding: 13px 22px 13px 24px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 1000px;
  border: 1px solid #e1e1e1;
  background: #fff;
  color: #7d7d7d;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
}

.search {
  flex: 1;
  width: 100%;
  transition: $transition-default;
  height: 50px;
}

.selected_container {
  max-width: 100vw;
}
.selected {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
  max-height: 80px;
  transition: $transition-disappear;
  top: 72px;
  position: absolute;
  z-index: 0;
  opacity: 1;
}
.hidden_selected {
  transition: $transition-disappear;
  top: 0;
  z-index: 0;
  opacity: 0;
}

.desktop {
  display: block;
}
.active {
  max-width: 100% !important;
}

.cancel {
  padding-left: 16px;
  margin: auto 0;
  font-size: 16px;
  line-height: 22px;
  opacity: 1;
  max-width: 80px;
  transition: 0.375s max-width ease, 0.375s max-height ease, 0.375s padding ease, 0.375s opacity ease;
}

@media screen and (max-width: 1260px) {
  .container_bigger {
    height: 148px;
  }
  .container_selected {
    height: 48px;
  }
}

@include media(sm) {
  .search {
    height: 40px;
  }
  .desktop {
    display: none;
  }
  .selected {
    -ms-overflow-style: none;
    scrollbar-width: none; /* Firefox */
    &::-webkit-scrollbar {
      opacity: 0;
      height: 0;
      width: 0;
      display: none;
      visibility: hidden;
      -webkit-appearance: none;
    }
    margin-top: 16px;
    width: calc(100% + 64px);
    margin-bottom: 16px;
    max-height: 70px;
    flex-direction: row;
    flex-wrap: nowrap;
    position: relative;
    overflow-y: hidden;
    overflow-x: auto;
    top: 0;
    left: -32px;
    padding: 0 32px;
    div {
      white-space: nowrap;
    }
  }
  .container {
    margin-top: 24px;
    margin-bottom: 16px;
    height: unset;
  }
  .hidden_selected {
    height: 0;
    padding: 0;
    margin: 0 !important;
  }
  .container_selected {
    height: unset;
  }
  .filters_container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: unset;
  }
  .filters {
    height: 40px;
  }
  .icon_settings {
    max-width: 40px;
    max-height: 40px;
    opacity: 1;
    width: 40px;
    height: 40px;
    transition: $transition-default-time $transition-default-time opacity;
  }
  .cancel {
    font-size: 14px;
    line-height: 20px;
    padding-left: 15px;
  }
}

@include media(xs) {
  .selected {
    left: -20px;
    padding: 0 20px;
    width: calc(100% + 40px);
  }
}
